import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/CourseRules',
      component: resolve => require(['@/components/common/Sidebar.vue'], resolve),
      children: [
        {
          // 排课规则设置
          path: '/',
          component: resolve => require(['@/components/views/CourseRules/Index.vue'], resolve),
          children: [
            {
              // 不排课时间
              path: 'ScheduleTime',
              component: resolve => require(['@/components/views/CourseRules/NoScheduleTime.vue'], resolve),
            },
            {
               // 合班
               path: 'WorkTogether',
               component: resolve => require(['@/components/views/CourseRules/WorkTogether.vue'], resolve),
            },
            {
              // 不连堂
              path: 'EvenChurch',
              component: resolve => require(['@/components/views/CourseRules/EvenChurch.vue'], resolve),
            },
            {
              // 基础规则设置
              path: 'BaseRule',
              component: resolve => require(['@/components/views/CourseRules/BaseRule.vue'], resolve),
            },

          ]
        },
      ]
    },
    {
      path: '/automatic',
      component: resolve => require(['@/components/common/Sidebar.vue'], resolve),
      children:[
        {
          //自动排课
        path: '/',
        component: resolve => require(['@/components/views/automatic/automatic.vue'], resolve)
        },
        {
        		//教室课表
          path: '/automatic/Classroom',
          component: resolve => require(['@/components/views/automatic/Classroom.vue'], resolve)
        },
        {
        		//学生课表
          path: '/automatic/Student',
          component: resolve => require(['@/components/views/automatic/Student.vue'], resolve)
        },
        {
        		//总课表
          path: '/automatic/MasterTimetable',
          component: resolve => require(['@/components/views/automatic/MasterTimetable.vue'], resolve)
        },
        {
        		//教师课表
          path: '/automatic/Teacher',
          component: resolve => require(['@/components/views/automatic/Teacher.vue'], resolve)
        }

      ]
   },
   {
      path: '/arrayTask',
      component: resolve => require(['@/components/common/titleAndNav.vue'], resolve),
      children:[
        {
          path: '/',
          component: resolve => require(['@/components/views/arrayTask/arrayTask.vue'], resolve)
        },
      ]
   },
   {
     path: '/BaseSetting',
     component: resolve => require(['@/components/common/Sidebar.vue'], resolve),
     children:[
        {
           path: '/BaseSetting/teacher',
           component: resolve => require(['@/components/views/BaseSetting/teachInfo.vue'], resolve)
         },
         {
           path: '/BaseSetting/teachTime',
           component: resolve => require(['@/components/views/BaseSetting/teachTime.vue'], resolve)
         },
         {
           path: '/BaseSetting/courseInfo',
           component: resolve => require(['@/components/views/BaseSetting/courseInfo.vue'], resolve)
         },
         {
           path: '/BaseSetting/classRoomInfo',
           component: resolve => require(['@/components/views/BaseSetting/classRoomInfo.vue'], resolve)
         },
         {
          //课程及教师
           path: '/BaseSetting/courseAndTeach',
           component: resolve => require(['@/components/views/BaseSetting/courseAndTeach.vue'], resolve)
         }
     ]
  },
  {
    path: '/wrong',
    component: resolve => require(['@/components/common/Wrong.vue'], resolve),
  }
  ]
})
